package com.javabase.y2022.m03.day0326;

/**
 * @descriptions: RuntimeConstantPoolOOM
 * @author: Tom
 * @date: 2022/3/26 下午 02:37
 * @version: 1.0
 */
public class RuntimeConstantPoolOOM {
    public static void main(String[] args) {
        String str1 = new StringBuilder("计算机").append("软件").toString();
        System.out.println(str1.intern() == str1);
        String str2 = new StringBuilder("Ja").append("va").toString();
        System.out.println(str2.intern() == str2);
    }
}
